/**
 * Aidttech.com Inc.
 * Copyright (c) 2017-2024 All Rights Reserved.
 */
package com.yunqiu.dbs.service.impl;

import com.yunqiu.dbs.service.DBService;

/**
 * @author yunqiu
 * Created by on 2024-07-22 9:58 下午
 */
public class SqlServerDBService extends DBService {

    public SqlServerDBService(String ip, String port, String dbName, String userName, String pwd) {
        super(ip, port, dbName, userName, pwd);
    }

    /**
     * 驱动
     * @return
     */
    @Override
    public String getDriver() {
        return "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    }

    /**
     * url
     * @param ip
     * @param port
     * @param dbName
     * @return
     */
    @Override
    public String getUrl(String ip, String port, String dbName) {
        return String.format("jdbc:sqlserver://%s:%s;DatabaseName=%s",ip,port,dbName);
    }
}